<%@ page language="java"  pageEncoding="UTF-8"%>
<%@include file="/common/jsp/cssAndScript.jsp"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page language="java" import="office.BusiUtil" %>
<%@include file="/pages/head.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>鼎烜电力集团网络办公平台</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
	</head>
<body>
 <form id="f1" action="examineSeting.action" method="post" >
	<table  width="100%" border="0" align="center">
		<Tr>
			<td colspan="2">
				<div class="window_1">
		        	<div id="assistFee_div">
		            	<h3 class="priceRulelist_title_pic_2">绩效考核人员设置<font color="red">（此设置表示为左侧人员对右侧人员的考核关系，比如左侧A（人力经理）对右侧B（商务经理）是人力评的关系）</font></h3>
		        	</div>
			    </div>
			</td>
		</Tr>
		<tr>
			<td style="width:50%;" align="center">
				  <div id="container_border">
					<div id="pricerulemanage" style="height:420px;">
			            <table width="100%" border="0" cellpadding="0"  cellspacing="0" class="gridview"  id="pricerule_table">
			                <thead>
				                <tr class="title">
				                    <td>单选钮</td>
				                    <td>序号</td>
				                    <td>用户名</td>
				                </tr>
			                </thead>
			                <tbody class="mytbody">
			                	<s:if test="examineSetingUserList.size()==0">
			                		<tr>
			                			<td colspan="5" align="center">无记录</td>
			                		</tr>
			                	</s:if>
			                	<s:else>
					                <s:iterator value="examineSetingUserList" status="stat">
					                	<s:if test="name != 'admin'">
						                	<tr>
								            	<td><input type="radio" name="aa" <s:property value="id==examineSetingVo.fromUserId?'checked=checked':''"/> value="<s:property value="id"/>" onclick="setUserId(this.value);"/></td>
								               	<td><s:property value="#stat.count"/></td>
								                <td><s:property value="cname"/></td>
								            </tr>
					                	</s:if>
							        </s:iterator>
			                	</s:else>
			                </tbody>
			            </table>
			        </div> 
			     </div>
	        </td>
	        <td style="width:50%;" align="center">
				  <div id="container_border">
				        <div id="pricerulemanage" style="height:420px;">
				            <table width="100%" border="0" cellpadding="0"  cellspacing="0" class="gridview"  id="pricerule_table">
				                <thead>
					                <tr class="title">
					                	<td style="width:30px">多选</td>
					                    <td>序号</td>
					                    <td>中文名称</td>
					                    <td>考核类型<input id="fromUserId" type="hidden" style="width: 300px;" name="examineSetingVo.fromUserId" value="<s:property value="examineSetingVo.fromUserId"/>" /></td>
					                </tr>
				                </thead>
				                <tbody class="mytbody">
				                	<s:if test="examineSetingUserList.size()==0">
				                		<tr>
				                			<td colspan="5" align="center">无记录</td>
				                		</tr>
				                	</s:if>
				                	<s:else>
						                <s:iterator value="examineSetingUserList" status="stat">
							                <s:if test="name != 'admin' && (#request.examineSetingVo == null || id != #request.examineSetingVo.fromUserId)">
									            <tr>
									            	<td style="width:30px">
									            		<input type="checkbox" <s:property value="examineSetingMap.get(id)!=null?'checked':''"/> name="toUserList[<s:property value="#stat.index"/>].toUserId" value="<s:property value="id"/>"/>
									            	</td>
									               	<td><s:property value="#stat.count"/></td>
									                <td><s:property value="cname"/></td>
									                <td>
									                <select id="type" name="toUserList[<s:property value="#stat.index"/>].type"  style="width: 200px">
										                <s:if test="'xsry,cwcn,cwkj,rszl,xzzl,sj,swzl'.indexOf(roles.iterator().next().role.name) == -1">
											                		<option value="">请选择</option>
											                		<option value="zjl" <s:if test="examineSetingMap.get(id).type=='zjl'">selected="selected"</s:if>>总经理评</option>
											                		<option value="down" <s:if test="examineSetingMap.get(id).type=='down'">selected="selected"</s:if>>下属评</option>
											                		<option value="xzrl" <s:if test="examineSetingMap.get(id).type=='xzrl'">selected="selected"</s:if>>人力评</option>
										                </s:if>
										                <s:else>
										                		<option value="">请选择</option>
										                		<option value="equal" <s:if test="examineSetingMap.get(id).type=='equal'">selected="selected"</s:if>>互评</option>
											                	<option value="department" <s:if test="examineSetingMap.get(id).type=='department'">selected="selected"</s:if>>部门评</option>
											                	<option value="leadership" <s:if test="examineSetingMap.get(id).type=='leadership'">selected="selected"</s:if>>领导评</option>
										                	
										                </s:else>
									                </select>
									                </td>
									            </tr>
									         </s:if>
								        </s:iterator>
				                	</s:else>
				                </tbody>
				            </table>
			           </div> 
			     </div>
			 </td>
	 	</tr>
	 	<tr>
	 		<td colspan="2"><input type="submit" id="b1" value="提交" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'"></td>
	 	</tr>
	 </table>
 </form>
</body>
<script type="text/javascript">
	function setUserId(id){
		document.getElementById("fromUserId").value=id;
		var _url = 'setExaminePerson.action?examineSetingVo.fromUserId='+id;
		location.href = _url;
	}
//	function checkAll(name) { 
//		var el = document.getElementsByTagName('input'); 
//		var len = el.length; 
//		for(var i=0; i<len; i++) { 
//			if((el[i].type=="checkbox")) { 
//				el[i].checked = true; 
//			}
//		} 
//	} 
	function clearAll() { 
		var el = document.getElementsByTagName('input'); 
		var len = el.length; 
		for(var i=0; i<len; i++) {
			if((el[i].type=="checkbox")) { 
				el[i].checked = false; 
			} 
		} 
	} 
</script>
</html>